<template>
    <div class="start-page" style="width:100vw;height:100vh;" @click="getIndex">
        <video id="myVideo" :src="videoList"
        style="width: 100vw;height: 100vh;"
       :show-mute-btn="false" :show-fullscreen-btn="false" :show-progress="false" :show-loading="false" :enable-progress-gesture="false" :controls="false" :show-center-play-btn="false"   @ended="getIndex" :show-play-btn="false"  autoplay muted  object-fit="cover"    @error="videoErrorCallback"  ></video>
    </div>
</template>

<script>

export default {
    components: {
      
    },
    props: {
      
    },
    watch: {
    
    },
    mounted() {
        this.hide()
    },
    data() {
        return {
            videoList: '/static/vcd.mp4'
        }
    },
    methods: {
        videoErrorCallback: function(e) {
            uni.showModal({
                content: e.target.errMsg,
                showCancel: false
            })
        },
        getIndex() {
           this.toPage()
        },
        toPage() {
            uni.reLaunch({
                url: '/pages/home/index',
            });
        },
        hide () {
            setTimeout( () => {
                if (this.lock == 0) {
                     this.getIndex()
                }
            }, 3000)
        }
    }

};
</script>

<style lang="scss" scoped>

</style>
